import React from "react";
import { ListRowState } from "../../types";

interface PropsType {
  v: ListRowState;
  onClick?: () => void;
}

export const ListItem: React.FC<PropsType> = (props) => {
  const { v, onClick } = props;
  return (
    <dl key={v.id} onClick={onClick}>
      <dt>
        <img src={v.image} alt="" />
      </dt>
      <dd>
        <h3>{v.title}</h3>
        <p>{v.word}</p>
        <p>{v.price}</p>
      </dd>
    </dl>
  );
};
